package com.alibaba.sdk.config.async;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @ author  Shawn(Shawn_0217@163.com)
 * @ date    2021/4/27 15:29
 * @ company Alibaba
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "async") // @Configuration @ConfigurationProperties需要配合使用
public class ThreadPoolConfig {

    /**
     * 核心线程数
     */
    private int corePoolSize = 2;

    /**
     * 最大线程数
     */
    private int maxPoolSize;

    /**
     * 线程存活时间
     */
    private int keepAliveSeconds;

    /**
     * 线程队列数 (int.max)
     */
    private int queueCapacity = 2147483647;

}
